The present invention relates generally to processing image data obtained, for example, by scanning a picture, document or other image, and more particularly, to a method and apparatus for duplicating an image wherein grayscale image data is compared to a threshold to convert the grayscale image data to binary image data which controls an image printer.
Grayscale image data is obtained by scanning an image with a suitable device, for example, a scanner comprising a plurality of charge-coupled devices (CCD's). The scanner effectively divides the image into a finite number of small picture elements referred to as pels or pixels. Each pixel of a scanned image is converted into a number representative of the grayscale value of the pixel as detected by a CCD scanner cell.
If the image is to be applied to a bilevel device, i.e., a device which reproduces each pixel as one of two grayscale values, the grayscale value of each pixel is converted to a binary number signifying which of the two grayscale values will represent the pixel. For a bilevel image duplication device, the two grayscale values are black or white and correspond to print or no print picture elements, respectively.
The determination of which pixels are to be printed or left not printed for duplication of a given image depends to some extent on the characteristics of the image. For example, portions of the image may be classified as continuous tone or text. Photographs and certain half tone images are examples of continuous tone while text is exemplified by line drawings and letter images.
While the grayscale image data may be processed in a variety of ways, the conversion from grayscale data to binary data is often accomplished by establishing a threshold to which the grayscale value of each pixel is compared. The result of the comparison is that if the grayscale value exceeds the threshold, a black or print representation is selected for the pixel and conversely, if the threshold is not exceeded, the pixel is left white or not printed. This thresholding technique is particularly satisfactory for the processing of text image data.
Fixed thresholds may be used for the conversion of grayscale image data to binary image data. However, fixed threshold comparisons do not accommodate images which have varying contrasts, i.e., images which are lighter or darker relative to one another. Histogram analysis has been applied to overcome such problems and account for darkness variations between images; however, such analyses are typically computationally demanding and tend to be avoided.
Accordingly, it has been found useful to provide threshold values that vary to be representative of the average grayscale value in a small region in the vicinity of a pixel being evaluated. Techniques are known which employ both analog circuitry, such as integrating capacitors, and digital circuitry, such as digital low-pass filters, for the explicit calculation of averages of adjacent pixel grayscale values. An implicit determination of average grayscale values of surrounding pixels by means of columnar and horizontal accumulations of grayscale values or reflectances for image pixels is also disclosed in U.S. Pat. No. 4,345,314.
While these prior art arrangements provide varying levels of effectiveness for different situations, improved techniques for generating adaptive grayscale image data thresholds are always needed to advance the art of image duplication and provide attractive and inexpensive alternatives.